The present invention relates to a method and apparatus which operate data by controlling hardware or a microprogram, and more particularly to a method and apparatus which executes a TMH (Test under Mask High) instruction and a TML (Test under Mask Low) instruction to set a condition code.
As well known in the prior art, a TM instruction consists of a one byte test mask and a one byte operand. See, for example, IBM's Enterprise Systems Architecture/390, "Principles of Operation Fourth Edition" (September 1996), Chapter 7, pages 7-73, 7-74 and A-30. The TM instruction sets a condition code at "0" when an operand selected by a test mask is all zeros or when a test mask is all zeros. When an operand selected by the test mask is a mixture of zeros and ones, the TM instruction sets the condition code at "1". When an operand selected by the test mask is all ones, the TM instruction sets the condition code at "3".
The TMH and TML instructions are known as extensions to the TM instruction. For example, see the above literature, pages 7-73 and 7-74. There are two extended points, that is, (1) the test mask and operand are respectably extended from one byte long to two bytes long, and (2) if an operand corresponding to the leftmost bit of the test mask is selected and a bit of the selected operand is zero, condition code 1 is set, and if the bit of the selected operand is one, condition code 2 is set, whereas in the case of the TM instruction when the operand selected by the test mark is a mixture of zeros and ones, condition code 1 is set.